<template>
	<!-- 意向用户详情页 -->
	<view>
		<uni-navbar :title="'意向用户详情页'"></uni-navbar>
		<div class="intend">
			<div class="intend-one">
				<h3>王医生 12564789582</h3>
				<span>未成交</span>
			</div>
			<ul class="intend-two">
				<li v-for="(item,index) in list" :key="index">
					<span>{{item.name}}</span>
					<span>{{item.Text}}</span>
				</li>
			</ul>
		</div>
		<div class='inten'>
			<u-tabs-swiper :current="current" :bold="false" name="name" ref="tabs" @change="tabsChange" :list="ist"
				:is-scroll="false"></u-tabs-swiper>
			<swiper class="s-view" :current="swiperCurrent">
				<swiper-item>
					<swiper-view>
						<view class="swiper-one">
							<div class="jiben" v-for="(item,index) in inter" :key="index">
								<span>{{item.name}}</span>
								<span>{{item.text}}</span>
							</div>
						</view>
					</swiper-view>
				</swiper-item>
				<swiper-item>
					<swiper-view>
						<view class="swiper-one">
							<div class="jiben" v-for="(item,index) in inter" :key="index">
								<span>{{item.name}}</span>
								<span>{{item.text}}</span>
							</div>
						</view>
					</swiper-view>
				</swiper-item>
				<swiper-item>
					<swiper-view>
						<view class="swiper-one">
							<div class="swione-one">
								<div class="swonon">
									<view>2022押题冲刺</view>
									<view>课程价格：折扣价1000元</view>
								</div>
								<div class="swtwtw">
									<view>未交清</view>
									<view>已缴费600元</view>
								</div>
							</div>
							<div class="swione-two">
								<span @click="qinqu">前去补款</span>
								<span @click="genduo">更多操作></span>
							</div>
						</view>
					</swiper-view>
				</swiper-item>
			</swiper>
		</div>
		<div @click="$u.route('/pages/applications/mineinten-edit/mineinten-edit')" v-if="tabsindex==0" class='bianji'>
			编辑
		</div>
		<div @click="$u.route('/pages/applications/minecuin-selection/minecuin-selection')" v-else class="bianji">
			选课
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current: 0,
				swiperCurrent: 0,
				list: [{
						name: '意向等级',
						Text: '有意向'
					},
					{
						name: '地区',
						Text: '河南郑州'
					},
					{
						name: '信息更新时间',
						Text: '022-08-31 11:10:08'
					}
				],
				ist: [{
					name: '基本信息',
					type: '0'
				}, {
					name: '跟进记录',
					type: '1'
				}, {
					name: '选课信息',
					type: '2'
				}],
				inter: [{
						name: '客户名称：',
						text: '张医生'
					},
					{
						name: '手机号：：',
						text: '17635645889'
					},
					{
						name: '性别：',
						text: '男'
					},
					{
						name: '意向等级：：',
						text: '有意向'
					},
					{
						name: '客户地区：：',
						text: '河南郑州'
					},
					{
						name: '获客来源：',
						text: '来源：推荐注册'
					},
					{
						name: '获客时间：',
						text: '2022-08-19 10:48:50'
					}
				],
				tabsindex: 0,
			};
		},
		methods: {
			genduo() {
				uni.navigateTo({
					url: '/pages/applications/payment_record/payment_record'
				})
			},
			qinqu() {
				uni.navigateTo({
					url: '/pages/applications/supplementary_payment/supplementary_payment'
				})
			},
			tabsChange(index) {
				this.swiperCurrent = index;
				this.current = index
				console.log(index);
				this.tabsindex = index
				// this.type = this.ist[index].type
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #eee;

	}

	.intend {
		background-color: #fff;
		padding: 30rpx;

		.intend-one {
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 2rpx solid #E6E6E6;
			padding-bottom: 30rpx;

			h3 {
				font-size: 26rpx;
				font-weight: bold;
				color: #4D4D4D;
			}

			span {
				display: inline-block;
				text-align: center;
				width: 88rpx;
				height: 27rpx;
				background: #F2F2F2;
				font-size: 18rpx;
				font-weight: 400;
				color: #999999;
				line-height: 27rpx;
			}
		}

		.intend-two {
			display: flex;
			padding: 30rpx;

			li {
				flex: 1;

				span {
					display: block;
					font-size: 20rpx;
					font-weight: 400;
					color: #4D4D4D;
				}

				span:nth-child(2) {
					margin-top: 22rpx;
				}
			}

			li:nth-child(2) {
				text-align: center;
			}

			li:nth-child(3) {
				text-align: right;
			}
		}
	}

	.inten {
		margin-top: 12rpx;
	}

	.swiper-one {
		padding: 30rpx;
		background-color: #fff;
		border-top: 1rpx solid #eee;

		.jiben {
			margin-top: 20rpx;
			display: flex;
			justify-content: space-between;

			span {
				font-size: 20rpx;
				font-weight: 400;
				color: #4D4D4D;
			}
		}

		.swione-one {
			display: flex;
			justify-content: space-between;

			.swonon {
				view:nth-child(1) {
					font-size: 24rpx;
					font-weight: 500;
					color: #4D4D4D;
					margin-bottom: 30rpx;
				}

				view:nth-child(2) {
					font-size: 20rpx;
					font-weight: 400;
					color: #4D4D4D;
				}
			}

			.swtwtw {
				view:nth-child(1) {
					width: 88rpx;
					height: 27rpx;
					background: #CDE7FF;
					font-size: 18rpx;
					font-weight: 400;
					color: #008EFE;
					line-height: 27rpx;
					text-align: center;
					margin-bottom: 30rpx;
				}

				view:nth-child(2) {
					font-size: 20rpx;
					font-weight: 400;
					color: #4D4D4D;
				}
			}
		}

		.swione-two {
			padding-top: 30rpx;
			margin-top: 30rpx;
			display: flex;
			justify-content: space-between;
			border-top: 1rpx solid #eee;

			span:nth-child(1) {
				font-size: 20rpx;
				font-weight: 400;
				text-decoration: underline;
				color: #FD9526;
				line-height: 40rpx;
				display: inline-block;
				border-bottom: 1rpx solid #FD9526;
			}

			span:nth-child(2) {
				font-size: 20rpx;
				font-weight: 400;
				color: #4C4C4C;
				line-height: 40rpx;
			}
		}
	}

	.s-view {
		width: 100%;
		height: 500rpx;
	}

	.bianji {
		position: fixed;
		bottom: 40rpx;
		left: 32rpx;
		width: 687rpx;
		height: 65rpx;
		background: #0590FE;
		border-radius: 33rpx;
		font-size: 30rpx;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 65rpx;
		text-align: center;
	}
</style>
